﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AlocaProfeV2
{
    public partial class SiteMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["nomeUsu"] == "" || Session["nomeUsu"] == null)
            {
                hiper1.Text = "Entrar";
                hiper1.NavigateUrl = "View/Login.aspx";
                hiper2.Text = "Cadastre-se";
                hiper2.NavigateUrl = "View/CadProfessor.aspx";
            }
            else
            {
                hiper1.Text = "Bem-vindo " + Session["nomeUsu"];
                hiper1.NavigateUrl = "#";
                hiper2.Text = "Sair";
                hiper2.NavigateUrl = "View/Logout.aspx";

                if(Session["tipoUsu"] == "coordenador")
                {
                    NavigationMenuProf.Visible = false;
                    NavigationMenuCoord.Visible = true;
                }
                else if (Session["tipoUsu"] == "professor")
                {
                    NavigationMenuCoord.Visible = false;
                    NavigationMenuProf.Visible = true;
                }
            }
        }
    }
}
